import { IframePostMessageTypeEnum, ChatPostMessageTypeEnum } from '../enums/postMessage';
import { ReadFileResult } from '../../utils/readDiskFile';

/** 从iframe window 发送到 chat window */
export type IIframePostMessageSendScreenshot = {
    type: IframePostMessageTypeEnum.IFRAME_SEND_SCREENSHOT;
};
export type IIframePostMessageSendPaste = {
    type: IframePostMessageTypeEnum.IFRAME_SEND_PASTE;
};
export type IIframePostMessageGetCode = {
    type: IframePostMessageTypeEnum.IFRAME_GET_CODE;
};
export type IIframePostMessageArgs =
    | IIframePostMessageSendScreenshot
    | IIframePostMessageSendPaste
    | IIframePostMessageGetCode;

/** 从chat window 发送到 iframe window */
export type IChatPostMessageSendScreenshot = {
    type: ChatPostMessageTypeEnum.CHAT_SEND_SCREENSHOT;
    data: ReadFileResult;
};
export type IChatPostMessageSendPaste = {
    type: ChatPostMessageTypeEnum.CHAT_SEND_PASTE;
    data: string;
};
export type IChatPostMessageGetCode = {
    type: ChatPostMessageTypeEnum.CHAT_GET_CODE;
};
export type IChatPostMessageArgs =
    | IChatPostMessageSendScreenshot
    | IChatPostMessageSendPaste
    | IChatPostMessageGetCode;
